package com.cn.action;

import com.cn.entity.Deal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cn.service.DealService;

@Controller
public class DealAction {
	@Autowired
	private DealService dealService;

	public DealService getDealService() {
		return dealService;
	}

	public void setDealService(DealService dealService) {
		this.dealService = dealService;
	}

	// 添加订单
	// 获取：userId（买家），goodId,dealTime
	// 返回：无
	@RequestMapping("/dealAddAction")
	@ResponseBody
	public void dealAddAction(Deal deal) {
		System.out.println("添加订单，商品名:" + deal.getDealId());
		dealService.addDeal(deal);
	}

}
